package com.example;

import org.jboss.logging.annotations.Pos;

import javax.ws.rs.*;
import javax.ws.rs.core.MediaType;
import java.io.Serializable;

@Path("/hello")
public class ExampleResource {

    @GET
    @Path("world")
    @Produces(MediaType.TEXT_PLAIN)
    public String hello() {
        return "Hello World";
    }


    @POST
    @Path("login")
    @Produces(MediaType.TEXT_PLAIN)
    public String login(loginInfo loginInfo) {
        if (loginInfo.email.equals("mtcode")&& loginInfo.pwd.equals("pwd")){
            return "成功";
        }
        return "错误";
    }
}